<?php

namespace App\Http\Middleware;

use App\Models\Rbac\GuardUser;
use Closure;
use Illuminate\Support\Facades\Session;

class Guard
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next) {

        if(!$request->hasHeader('token')){
            return responseFail('缺少token！');
        }

        return $next($request);
    }
}
